<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
	<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
	<link rel="stylesheet" type="text/css" href="/css/editthings.css" />
	<script type="text/javascript" src="/js/ckeditor/ckeditor.js" language="javascript" ></script>
	<link rel="stylesheet" type="text/css" href="/css/tabLanguages.css" />
	<script src="/js/admin/jquery/jquery-1.6.1.min.js" type="text/javascript"></script>
	<link rel="stylesheet" type="text/css" href="/js/admin/jquery/ui/themes/ui-lightness/jquery.ui.all.css" />
	<script src="/js/admin/jquery/ui/jquery-ui-1.8.16.custom.min.js" type="text/javascript"></script>
	<script src="/js/admin/jquery/ui/external/jquery.bgiframe-2.1.2.js" type="text/javascript"></script>
	<script src="/js/admin/jquery/tab.js" type="text/javascript"></script>
	<script src="/js/admin/jquery/superfish/js/superfish.js" type="text/javascript"></script>
</head>
<body>
				<?php if($this->error == 9){?>
<center><?php echo $notogin;?></center>
<?php }else if($this->error==10) {?>
<center><?php echo $has_modify;?></center>
<?php }else { if($this->error == 1){?>
					<script type="text/javascript">
						window.parent.$.prettyPhoto.close();
						window.top.location.reload();
						window.parent.$.prettyPhoto.close();
					</script><?php }?>
				<form method="post" action="/questionanswer/edit/editqa?action=edit&qaid=<?php echo $this->qa_id;?>" name="form_edit_product" id="form_edit_product">
					
					<div class="content_btn" style="float: right">
						<div class="submit">
							<input type="submit" value="<?php echo $this->text_Save?>" name="submit" class="edit_submit" />
						</div>
					</div>
					<div><p><?php echo $this->text_Edit?></p></div>
					<div style="clear: both;"></div>
					<div class="line"><hr></div>
					<?php if($this->error == -1){?><h4 style="color:red"><?php echo $this->textError1?></h2><?php }?>
					<?php if($this->error == 5){?><h4 style="color:red"><?php echo $this->textError2?></h2><?php }?>
					<?php if($this->error == 6){?><h4 style="color:red"><?php echo $this->textError3?></h2><?php }?>
					
					<div class="content_row">
						<div class="content_row_l">
							<p><?php echo $this->text_Cate;?>
							<select tabindex="0" name="QA_category" id="QA_category">
								<?php foreach ($this->CategoriesQA as $category){ if($this->category == $category["category_id"]) {?>
								<option value="<?php echo $category["category_id"];?>"><?php echo $category["category_name"];?></option>
								<?php }} ?>
							 </select></p>
							 
							 <?php if($this->error == 3){?><h4 style="color:red;margin-top: -15px;height: 10px;"><?php echo $this->textError5?></h4><?php }?>
							
						</div>
					</div>
					
					<div id="languages" class="htabs">
						<?php foreach ($this->languages as $language) { ?>
						<a tab="#language<?php echo $language['language_id']; ?>"><?php echo $language['name']; ?></a>
						<?php } ?>
					</div>
				
				<?php foreach ($this->languages as $language) { ?>
				<div id="language<?php echo $language['language_id']; ?>">
					<div class="content_row">
						<div class="content_row_l">
							<p><?php echo $this->text_Title;?> : <input type="text" value="<?php echo $this->title[$language['name']];?>" size="30" maxlength="30" name="QA_title[<?php echo $language['name'];?>]" id="QA_title[<?php echo $language['name'];?>]" class="content_input"/></p>
							<?php if(isset($this->error_desc[$language['name']][0])){?><h4 style="color:red;margin-top: -15px;height: 10px;"><?php echo $this->textError4?></h4><?php }?>
						</div>
						</div>
					<div style="clear:both;"></div>
					
					<div class="content_row">
						<div class="content_row_l"><p><?php echo $this->text_Content?></p></div>
						<?php if(isset($this->error_desc[$language['name']][1])){?><h4 style="color:red;margin-top: -15px;height: 10px;"><?php echo $this->textError6?></h4><?php }?>
						<div class="content_row_r">
							<textarea name="QA_description[<?php echo $language['name'];?>]" class="ckeditor" style="visibility: hidden; display: none;"><?php echo $this->description[$language['name']];?></textarea>
						</div>
					</div>
				</div>
				<?php }?>
					
				</form>
<script type="text/javascript"><!--
$.tabs('#languages a'); 
//--></script>
				<?php }?>
</body>		
</html>		